#pragma once
#include "dllmain.h"
#include "fuString.h"
#include "_tixpath/tinyxml.h"

BEGIN_NAMESPACE_CPPX

class fuXmlSvnEntry : public TiXmlVisitor
{
public:
	fuString m_kind;
	fuString m_name;
	fuString m_size;
	fuString m_revision;
	fuString m_author;
	fuString m_date;

public:
	fuXmlSvnEntry(const fuString & kind);
	virtual ~fuXmlSvnEntry(void);

	virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute );
};

class fuXmlSvnList : public TiXmlVisitor
{
public:
	fuString				m_path;
	std::vector<fuXmlSvnEntry *>	Entrys;

public:
	fuXmlSvnList(const fuString & path);
	virtual ~fuXmlSvnList(void);

	void Release(void);

	virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute );
};

class _CPPX_API fuXmlSvnLists : public TiXmlVisitor
{
	TiXmlDocument	m_doc;

public:
	std::vector<fuXmlSvnList *> Lists;

public:
	fuXmlSvnLists(void);
	virtual ~fuXmlSvnLists(void);

	void Release(void);
	bool Parse(const fuString & src);

	virtual bool VisitEnter( const TiXmlElement & element, const TiXmlAttribute * firstAttribute );
};

END_NAMESPACE_CPPX
